
// MIT License
// 
// Copyright (c) 2009-2017 Luca Piccioni
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// 
// This file is automatically generated

#pragma warning disable 649, 1572, 1573

// ReSharper disable RedundantUsingDirective
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;

using Khronos;

// ReSharper disable CheckNamespace
// ReSharper disable InconsistentNaming
// ReSharper disable JoinDeclarationAndInitializer

namespace OpenGL
{
	public partial class Gl
	{
		/// <summary>
		/// [GL] Value of GL_SHADER_INCLUDE_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
		public const int SHADER_INCLUDE_ARB = 0x8DAE;

		/// <summary>
		/// [GL] Value of GL_NAMED_STRING_LENGTH_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
		public const int NAMED_STRING_LENGTH_ARB = 0x8DE9;

		/// <summary>
		/// [GL] Value of GL_NAMED_STRING_TYPE_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
		public const int NAMED_STRING_TYPE_ARB = 0x8DEA;

		/// <summary>
		/// [GL] glNamedStringARB: Binding for glNamedStringARB.
		/// </summary>
		/// <param name="type">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="namelen">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="name">
		/// A <see cref="T:string"/>.
		/// </param>
		/// <param name="stringlen">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="string">
		/// A <see cref="T:string"/>.
		/// </param>
		[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
		public static void NamedStringARB(int type, int namelen, string name, int stringlen, string @string)
		{
			Debug.Assert(Delegates.pglNamedStringARB != null, "pglNamedStringARB not implemented");
			Delegates.pglNamedStringARB(type, namelen, name, stringlen, @string);
			LogCommand("glNamedStringARB", null, type, namelen, name, stringlen, @string			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glDeleteNamedStringARB: Binding for glDeleteNamedStringARB.
		/// </summary>
		/// <param name="namelen">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="name">
		/// A <see cref="T:string"/>.
		/// </param>
		[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
		public static void DeleteNamedStringARB(int namelen, string name)
		{
			Debug.Assert(Delegates.pglDeleteNamedStringARB != null, "pglDeleteNamedStringARB not implemented");
			Delegates.pglDeleteNamedStringARB(namelen, name);
			LogCommand("glDeleteNamedStringARB", null, namelen, name			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glCompileShaderIncludeARB: Binding for glCompileShaderIncludeARB.
		/// </summary>
		/// <param name="shader">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="path">
		/// A <see cref="T:string[]"/>.
		/// </param>
		/// <param name="length">
		/// A <see cref="T:int[]"/>.
		/// </param>
		[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
		public static void CompileShaderIncludeARB(uint shader, string[] path, int[] length)
		{
			unsafe {
				fixed (int* p_length = length)
				{
					Debug.Assert(Delegates.pglCompileShaderIncludeARB != null, "pglCompileShaderIncludeARB not implemented");
					Delegates.pglCompileShaderIncludeARB(shader, path.Length, path, p_length);
					LogCommand("glCompileShaderIncludeARB", null, shader, path.Length, path, length					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glIsNamedStringARB: Binding for glIsNamedStringARB.
		/// </summary>
		/// <param name="namelen">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="name">
		/// A <see cref="T:string"/>.
		/// </param>
		[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
		public static bool IsNamedStringARB(int namelen, string name)
		{
			bool retValue;

			Debug.Assert(Delegates.pglIsNamedStringARB != null, "pglIsNamedStringARB not implemented");
			retValue = Delegates.pglIsNamedStringARB(namelen, name);
			LogCommand("glIsNamedStringARB", retValue, namelen, name			);
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [GL] glGetNamedStringARB: Binding for glGetNamedStringARB.
		/// </summary>
		/// <param name="namelen">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="name">
		/// A <see cref="T:string"/>.
		/// </param>
		/// <param name="bufSize">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="stringlen">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="string">
		/// A <see cref="T:StringBuilder"/>.
		/// </param>
		[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
		public static void GetNamedStringARB(int namelen, string name, int bufSize, out int stringlen, StringBuilder @string)
		{
			unsafe {
				fixed (int* p_stringlen = &stringlen)
				{
					Debug.Assert(Delegates.pglGetNamedStringARB != null, "pglGetNamedStringARB not implemented");
					Delegates.pglGetNamedStringARB(namelen, name, bufSize, p_stringlen, @string);
					LogCommand("glGetNamedStringARB", null, namelen, name, bufSize, stringlen, @string					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glGetNamedStringivARB: Binding for glGetNamedStringivARB.
		/// </summary>
		/// <param name="namelen">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="name">
		/// A <see cref="T:string"/>.
		/// </param>
		/// <param name="pname">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="params">
		/// A <see cref="T:int[]"/>.
		/// </param>
		[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
		public static void GetNamedStringARB(int namelen, string name, int pname, [Out] int[] @params)
		{
			unsafe {
				fixed (int* p_params = @params)
				{
					Debug.Assert(Delegates.pglGetNamedStringivARB != null, "pglGetNamedStringivARB not implemented");
					Delegates.pglGetNamedStringivARB(namelen, name, pname, p_params);
					LogCommand("glGetNamedStringivARB", null, namelen, name, pname, @params					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glGetNamedStringivARB: Binding for glGetNamedStringivARB.
		/// </summary>
		/// <param name="namelen">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="name">
		/// A <see cref="T:string"/>.
		/// </param>
		/// <param name="pname">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="params">
		/// A <see cref="T:int"/>.
		/// </param>
		[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
		public static void GetNamedStringARB(int namelen, string name, int pname, out int @params)
		{
			unsafe {
				fixed (int* p_params = &@params)
				{
					Debug.Assert(Delegates.pglGetNamedStringivARB != null, "pglGetNamedStringivARB not implemented");
					Delegates.pglGetNamedStringivARB(namelen, name, pname, p_params);
					LogCommand("glGetNamedStringivARB", null, namelen, name, pname, @params					);
				}
			}
			DebugCheckErrors(null);
		}

		internal static unsafe partial class Delegates
		{
			[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glNamedStringARB(int type, int namelen, string name, int stringlen, string @string);

			[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
			[ThreadStatic]
			internal static glNamedStringARB pglNamedStringARB;

			[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glDeleteNamedStringARB(int namelen, string name);

			[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
			[ThreadStatic]
			internal static glDeleteNamedStringARB pglDeleteNamedStringARB;

			[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glCompileShaderIncludeARB(uint shader, int count, string[] path, int* length);

			[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
			[ThreadStatic]
			internal static glCompileShaderIncludeARB pglCompileShaderIncludeARB;

			[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
			[SuppressUnmanagedCodeSecurity]
			[return: MarshalAs(UnmanagedType.I1)]
			internal delegate bool glIsNamedStringARB(int namelen, string name);

			[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
			[ThreadStatic]
			internal static glIsNamedStringARB pglIsNamedStringARB;

			[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glGetNamedStringARB(int namelen, string name, int bufSize, int* stringlen, StringBuilder @string);

			[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
			[ThreadStatic]
			internal static glGetNamedStringARB pglGetNamedStringARB;

			[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glGetNamedStringivARB(int namelen, string name, int pname, int* @params);

			[RequiredByFeature("GL_ARB_shading_language_include", Api = "gl|glcore")]
			[ThreadStatic]
			internal static glGetNamedStringivARB pglGetNamedStringivARB;

		}
	}

}
